<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
</head>

<body>
    <div id="app">
        <label >Id:
            <input type="text" v-model="id">
        </label>
        <label >Name:
            <input type="text" v-model="name">
        </label>
        <input type="button" value="添加" @click="toggle">
        <p v-for='user in list' key="user.id">
            <input type="checkbox" name="" id="">
            {{user.id}}----{{user.name}}
        </p>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                id:"",
                name:"",
                list:[
                    {id:1,name:"校长"},
                    {id:2,name:"校长"},
                    {id:3,name:"校长"},
                    {id:4,name:"校长"},
                claObjs:
                ]
            },
            methods: {
                toggle(){
                    this.list.push({id:this.id,name:this.name})
                }
            },
        })
    </script>
</body>

</html>